﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using JeffWilcox.Utilities.Silverlight;
using System.Windows.Browser;
using System.Threading;
using System.IO;
using System.Text;
using System.Runtime.Serialization.Json;
using System.Reflection;
using VkApi.DataTypes;

namespace VkApi
{
    public partial class VkApi
    {
        /// <summary>
        /// Sets the prefix for sending SMS in application.
        /// </summary>
        /// <param name="prefix">The prefix. Any 3-16 latin letters.</param>
        /// <param name="callback">The callback.</param>
        /// <returns>1 if success. 145 if prefix already occupied. 146 if mobile number is unknown.</returns>
        public long SMS_SetSMSPrefix(string prefix, ApiCallback<int> callback)
        {
            List<Parameter> list = new List<Parameter>();
            list.Add(new Parameter("prefix", prefix));            
            return this.SendRequest("setSMSPrefix", callback, list.ToArray());
        }

        /// <summary>
        /// Gets the unique SMS prefix for the application.
        /// </summary>
        /// <param name="callback">The callback.</param>
        /// <returns>Prefix or 0 if failed.</returns>
        public long SMS_GetSMSPrefix( ApiCallback<String> callback)
        {           
            return this.SendRequest("getSMSPrefix", callback, null);
        }

    }
}
